//
// Created by shen on 2025/1/9.
//

#include "SLog.h"
static shared_ptr<SLog> singleton= nullptr;
static std::mutex singletonMutex;
shared_ptr<SLog> SLog::GetInstance() {
    if (singleton== nullptr){
        std::unique_lock<std::mutex> lock(singletonMutex);
        if (singleton== nullptr){
            singleton =  std::make_shared<SLog>();
        }//
    }
    return singleton;
}
SLog::SLog() {
    if (PLATFORM_ANDROID==1){
        logger = spdlog::android_logger_mt("android", TAG);
//        logger->set_level(spdlog::level::off);
    }

}

SLog::~SLog() = default;